﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DMSystem_Sqlite_WebAPI.Utility.Quartz
{
    public class JobInfo
    {
        public string Name { get; private set; }
        public ICollection<TriggerInfo> Triggers { get; set; }

        public JobInfo(string name)
        {
            Name = name;
            Triggers = new List<TriggerInfo>();
        }

        public JobInfo(string name, TriggerInfo triggerInfo)
            : this(name)
        {
            Triggers.Add(triggerInfo);
        }
    }

    public class TriggerInfo
    {
        public string Name { get; private set; }
        public string Cron { get; private set; }

        public TriggerInfo(string name, string cron)
        {
            Name = name;
            Cron = cron;
        }
    }
}
